import 'package:flutter/material.dart';
import 'package:flutter_demo/common/ProfileChangeNotifier.dart';

class LocalModel extends ProfileChangeNotifier {


  Locale getLocal() {
    if (profile.locale == null) {
      return null;
    }
    var t = profile.locale.split("_");
    return Locale(t[0], t[1]);
  }

  set locale(String locale) {
    if (profile.locale != locale) {
      profile.locale = locale;
      notifyListeners();
    }
  }
}